import 'package:test/test.dart';
import 'package:napi/src/errors.dart';

void main() {
  group('Ark/N-API exceptions (host-only)', () {
    test('UseAfterReleaseError sample', () {
      expect(() => throw UseAfterReleaseError(), throwsA(isA<UseAfterReleaseError>()));
    });
    test('DoubleReleaseError sample', () {
      expect(() => throw DoubleReleaseError(), throwsA(isA<DoubleReleaseError>()));
    });
    test('NapiException sample', () {
      expect(() => throw NapiException('x', 'y'), throwsA(isA<NapiException>()));
    });
  });
}
